package com.ruoyi.place.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.annotation.AreaName;
import com.ruoyi.common.annotation.ExcelDictFormat;
import com.ruoyi.common.annotation.UserMemberInfo;
import com.ruoyi.common.convert.ExcelDictConvert;
import com.ruoyi.common.core.domain.vo.DutyTcVo;
import com.ruoyi.common.core.domain.vo.IsPlaceInfo;
import com.ruoyi.common.enums.PlaceType;
import lombok.Data;

import java.util.List;


/**
 * 房屋信息视图对象 place_info
 *
 * @author strongme
 * @date 2023-05-02
 */
@Data
@ExcelIgnoreUnannotated
public class PlaceInfoVo implements IsPlaceInfo {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ExcelProperty(value = "主键")
    private Long id;

    private PlaceType placeType;

    private DutyTcVo dutyTcVo;

    /**
     * 单位（地区）
     */
    @ExcelProperty(value = "单位", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "地=区")
    private String area;

    @AreaName
    public String getAreaInfo() {
        return area;
    }

    /**
     * 房屋名称
     */
    @ExcelProperty(value = "房屋名称")
    private String name;

    /**
     * 房屋类型
     */
    @ExcelProperty(value = "房屋类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "fwlx")
    private String type;

    /**
     * 地址
     */
    @ExcelProperty(value = "地址")
    private String address;

    /**
     * 所在村社
     */
    private String szcs;

    private Long fzr;

    @UserMemberInfo
    public Object getFzrInfo() {
        return fzr;
    }


    @Override
    public Long getPlaceId() {
        return id;
    }

    @Override
    public DutyTcVo getTcInfo() {
        return dutyTcVo;
    }

    @Override
    public void setTcInfo(DutyTcVo tcInfo) {
        this.dutyTcVo = tcInfo;
    }

    private List<DutyTcVo> dutyTcVoList;

    @Override
    public List<DutyTcVo> getTcInfoList() {
        return dutyTcVoList;
    }

    @Override
    public void setTcInfoList(List<DutyTcVo> dutyTcVoList) {
        this.dutyTcVoList = dutyTcVoList;
    }

}
